/*
 * @Author: zhanglianchang
 * @Date: 2020-08-01 14:39:32
 * @Last Modified by: taoshiwei
 * @Last Modified time: 2019-04-29 14:57:26
 *
 * 标签有关的接口：自己写吧~~  已经被张老师删了 ^_^
 */

import { createAPI } from '@/utils/request'

export const TestLabel = () => createAPI('/tags/simple', 'get')
// 标签列表
export const getTags = data => createAPI('/tags/simple', 'get', data)
// import { createAPI } from '@/utils/request'

// 目录列表
export const listOK = data => createAPI('/tags', 'get', data)

// 学科
export const Simple = () => createAPI('/subjects/simple', 'get')

// 标签简单列表
export const simple = data => createAPI('/tags/simple', 'post', data)

// 标签详情
export const detail = data =>
  createAPI(`/tags/${data.id}`, 'get', data)

// 标签添加
export const add = data => createAPI('/tags', 'post', data)

// 标签修改
export const update = data => createAPI(`/tags/${data.id}`, 'put', data)

// 标签删除
export const remove = data =>
  createAPI(`/tags/${data.id}`, 'delete', data)

// 标签状态
export const changeStateOk = data => createAPI(`/tags/${data.id}/${data.state}`, 'POST', data)

// 获取标签简单列表
export const list = data => createAPI('/tags', 'get', data)
